-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
  • 77,979
  • 13
  • 71
  • 125
Tamir
  • 3
  • 1

1 Answers1

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

Updated as per Cyrus's comment.

Red Cricket
  • 8,734
  • 16
  • 67
  • 148