Search Results

Search: Posts Made By: JustALol
3,086
Posted By JustALol
Hi, sorry for my late reply, it ended up...
Hi,

sorry for my late reply, it ended up working fine

newvar=$($var1 | awk '{print $1}')


Thankyou for your replies
3,086
Posted By JustALol
hi, the first one doesn't work , shows a...
hi,

the first one doesn't work , shows a syntax error on the last bracket.



I am doing this.

var1="md5sum file1"

newvar={$var1 | awk '{print $1}'}

$newvar
3,086
Posted By JustALol
Storing command output in a variable and using cut/awk
Hi,

My aim is to get the md5 hash of a file and store it in a variable.


var1="md5sum file1"
$var1


The above outputs fine but also contains the filename, so somthing like this 243ASsf25...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy