Search Results

Search: Posts Made By: vijai
2,402
Posted By guruprasadpr
sed -i 's/\(var1=\).*/\11/' var -i To...
sed -i 's/\(var1=\).*/\11/' var

-i To update the file in-place
s - To find and replace (eg: s/find/replace/)
var1= - Finds the line containing the pattern var1= and it is grouped using...
2,402
Posted By guruprasadpr
The sed command provided updates your "var" file...
The sed command provided updates your "var" file with the value 1. This command does not give any output. You will see the changes next time when you source your file.

Guru.
3,764
Posted By mirni
What did you try to achieve with this line? ...
What did you try to achieve with this line?
user=$user
I'd bet $user is not set. You probably want to do any of these equivalent ways to get the current user:
chown -R $USER extracted
chown -R...
1,913
Posted By pamu
Welcome to the Unix.com forum.:) Try...
Welcome to the Unix.com forum.:)

Try something like this...


read name_of_tar
echo $name_of_tar #To Use that variable use $ ahead of it..

#Assuming you have urls only.

echo...
1,913
Posted By Don Cragun
After using read name_of_tar to get the name of...
After using read name_of_tar to get the name of the tar file you want to create. You use it by changing
tar -H ustar -c file1 file2 > name.tar
to:
tar -H ustar -c file1 file2 > "$name_of_tar"...
Showing results 1 to 5 of 5

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