10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
2. UNIX for Dummies Questions & Answers
I have a file with a lot of IP addresses in it named "address.list".
address.list looks something like this:
10.77.50.11
10.77.50.110
10.77.50.111
a bunch more addresses
For every IP address I need to grep another file to see if the IP address is in the other file:
for x in `cat... (5 Replies)
Discussion started by: squoggle
5 Replies
3. Shell Programming and Scripting
Im stumped on this one. Id like to echo into a .txt file all names for an xml feed in a huge folder. Can that be done?? Id need to echo <name>This name</name> in client.xml files.
$path="/mnt/windows/path"
echo 'recording names'
cd "$path"
for names in $path
than Im stuck on... (2 Replies)
Discussion started by: graphicsman
2 Replies
4. Shell Programming and Scripting
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1
CAR2_KEY0
CAR2_KEY1
CAR1_KEY10
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
Discussion started by: thibodc
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
I want know "How to find a file if we dont know exact location of file ?"
Thanks,
Tushar Joshi:) (9 Replies)
Discussion started by: tusharjoshi
9 Replies
6. UNIX for Advanced & Expert Users
Hello Folks,
A wrapper takes an argument of file or directory name.
I want to allow paths that reside within the current directory only.
Can simply discard the paths like "/A" & "../" as they go outside the current by looking at the path beginning.
How to validate this one:
A/../../../b... (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies
7. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
9. Shell Programming and Scripting
I want to access exact line in a file (sh script)
for example I have a variable input and I want to access input.th line in file. for example line 5 or 7. (2 Replies)
Discussion started by: walnut
2 Replies
10. Shell Programming and Scripting
Hi
Let say there is a file a.txt which contain number rows.
My intention is to find the number of occurences of a pattern. Let say the pattern is mdbase. then it should not count the occurences of mdbase1 or mdbase2 like this. When I tried to find it like
grep "/backup/surjya/mdbase"... (7 Replies)
Discussion started by: surjyap
7 Replies