Search Results

Search: Posts Made By: Kishore920
3,097
Posted By Kishore920
Cutting a string and storing it in a variable
Hello

I have a script:
path=test1
echo "${path%?}"

till this the program is successful in deleting hte last character i.e. "1" and displays an output --> test. After this how can i save...
1,597
Posted By Kishore920
This work perfectly for me. Thanks a lot. :)
Like this since you are in Linux:

$ cat file
roses are red, so what do i do
nothing, just get the next string


$ var=$(grep -oP '(?<=roses )\S+' file)
$ echo $var
are

Guru.
1,597
Posted By Kishore920
Copying a string from a file using shell script
Hello everyone

I am completely new to shell scripting in linux. I wan to write a script to search for a certain string from a .txt file and copy the string which apears just after tat searched...
Showing results 1 to 3 of 3

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