-2

I have a file named "myout" in my current directory. I wish to set the variable x to be the output of that line:

cat myout | cut -d" " -f1 | cut -d"/" -f1

I searched all over the site and couldn't find an answer, any help would be appreciated!

Cyrus
  • 84,225
  • 14
  • 89
  • 153
Tamir
  • 3
  • 2

1 Answers1

0
x=$(cut -d" " -f1 ./myout |  cut -d "/" -f1)

Updated as per Cyrus's comment.

Red Cricket
  • 9,762
  • 21
  • 81
  • 166