Search Results

Search: Posts Made By: learninguser235
1,497
Posted By learninguser235
Thanks all, @neutronscott--the code kind of work...
Thanks all, @neutronscott--the code kind of work , i get the files from the directory for the box specified but gets all the files, not reading the user input.

If i hardcode the build name , i get...
1,497
Posted By learninguser235
Issues for script that login to a unix box
Hi,

I have a script that should login to a different box then the box that i am in and run the commands.

I have the script sample below that logins to a unix box and get the files .Looks like...
1,346
Posted By learninguser235
ls -lrt | awk -F\/ '/\//{print $(NF-1) $NF }' ...
ls -lrt | awk -F\/ '/\//{print $(NF-1) $NF }'

This gave be the build name and build number but without space, how do i get to display build name with build # without space between build name and...
1,346
Posted By learninguser235
Thanks @itkamaraj, Below command works. ls...
Thanks @itkamaraj,
Below command works.
ls -lrt | awk -F\/ '/\//{print $(NF-1) $NF }', just gave me the build name and build number.
1,346
Posted By learninguser235
help with sed command
hi ,

I have a directory where the files were listed in format directory, date,etc.. and then : buildname->/apps/versions/buildname/build number

I use the below awk command which deletes all...
29,357
Posted By learninguser235
Thanks gary_w and methyl, it worked after...
Thanks gary_w and methyl, it worked after correcting the space, i am using space after "=" sign .
29,357
Posted By learninguser235
Thanks for the reply but after using var=...
Thanks for the reply but after using
var= $(grep -n "$DATE" Activity.log | head -n 1 | sed -n 's/^\([0-9]*\)[:].*/\1/p')
echo "$var", i get command not found error and prints the value of the...
29,357
Posted By learninguser235
How to store the value of grep in a variable
Hi ,

I was trying to store the value of a grep command to store in a variable so i can use it somewhere else in my script but i am getting error, i am using bash shell in linux:

var= `grep -n...
1,794
Posted By learninguser235
I tried this : sed "1,${getlinenumber}d"...
I tried this : sed "1,${getlinenumber}d" inputfile > file1.txt

Please use next time code tags (https://www.unix.com/how-post-unix-linux-forums/167686-forum-video-tutorial-how-use-code-tags.html)...
1,794
Posted By learninguser235
sorry, still did not work , i get this error :...
sorry, still did not work , i get this error : sed: -e expression #1, char 3: unexpected `,'
2,968
Posted By learninguser235
How to delete lines above a certin line number in bash shell
Hi,

I have written a script that returns the line number of the pattern i want and i stored the line number in a variable(getlinenumber).Now i want to delete all the lines in a file above this...
1,794
Posted By learninguser235
How to delete lines above a certin line number in bash shell
Hi,

I have written a script that returns the line number of the pattern i want and i stored the line number in a variable.Now i want to delete all the lines in a file above this line number which...
Showing results 1 to 12 of 12

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