if HereIsAKey
is unique in your file, try this with grep:
myVar=$(grep -Po "(?<=^HereIsAKey ).*" file)
More Related Contents:
- create a file with prefix =file1 followed by the random number
- How to read a file line by line and making a new file for each line having same filename as last word of each line? [closed]
- Why to code a script which will check if some package is installed in linux and if not then install it?
- Read values into a shell variable from a pipe
- Fastest way to find lines of a file from another larger file in Bash
- Use sudo with password as parameter [closed]
- Shell script: Run function from script over ssh
- What is the difference between using `sh` and `source`?
- Get the Perl rename utility instead of the built-in rename
- Automating telnet session using bash scripts
- Run a shell command when a file is added
- How do I syntax check a Bash script without running it?
- Pass a password to ssh in pure bash
- extracting unique values between 2 sets/files
- Pattern match does not work in bash script
- Unable to export the variable through script file [duplicate]
- CURL to access a page that requires a login from a different page
- How do you normalize a file path in Bash?
- Extract one word after a specific word on the same line [duplicate]
- How do I remove newlines from a text file?
- Error “syntax error near unexpected token ‘(‘” in Bash script when selecting files
- How to copy a file to multiple directories using the gnu cp command
- pass stdout as file name for command line util?
- Using `date` command to get previous, current and next month
- Linux: remove file extensions for multiple files
- Joining multiple fields in text files on Unix
- Counter increment in Bash loop not working
- Start script after another one (already running) finishes
- Problem with Bash output redirection [duplicate]
- Why exit code 141 with grep -q?