10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a many folders in a directory under which there are many subdirectories containing text files containing the word "shyam" in them.I want all the files in all the directories containing "shyam to "ram" ??
sed "s/shyam/ram/g" does it ??But anyone can help me with the script ??
... (3 Replies)
Discussion started by: Pradeep_1990
3 Replies
2. UNIX for Dummies Questions & Answers
printf "\\" prints a backslash.how we can print multiple backslashes such as "\\\\\\\\\\\\\\\\\\\\".
Thanks (4 Replies)
Discussion started by: pandeesh
4 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
I have a file like below. I want to replace all the '.' in the 3rd column with 'NA'. I don't know how to do that. Anyone has an iead? Thanks a lot!
8 70003200 21.6206
9 70005700 17.5064
10 70002200 .
11 70005100 19.1001
17 70008000 16.1970
32 70012400 26.3465
33... (9 Replies)
Discussion started by: forevertl
9 Replies
4. Shell Programming and Scripting
Help!
I'm trying this command but keep getting illegal syntax etc.
awk '{ sub(/00012345/,"000123456"); print}' >newfile
I don't understand. It works on one unix machine but not another! (4 Replies)
Discussion started by: Grueben
4 Replies
5. Shell Programming and Scripting
I have following set of dirs:
/dir1/dir2/subdir1
file1
file2
/dir1/dir3/subdir1
file4
file5
/dir1/dir4/subdir1
file6
file7
All of these files have a common string in them say "STRING1", How can I... (3 Replies)
Discussion started by: Hangman2
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Newbie here. I have a file that consists of data that I want to convert to a csv file. For example:
Jul 20 2008 1111 / visit home / BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 21 2008 22222 / add friend / BlackBerry8830/4.2.2 Profile/MIDP-2.0... (3 Replies)
Discussion started by: kangaroo
3 Replies
7. UNIX for Dummies Questions & Answers
Using a small script, I automatically generated some text logs. The files ended being undownloadable, unopenable and undeletable. Upon further investigation, the files ended up looking like this:
log\r
log2\r
log3\r
I've tried a few different things, including double slashing before the... (6 Replies)
Discussion started by: shepherdsflock
6 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
I'd like to replace STRING_ZERO in FILE_ZERO.txt with the value of VALUEi-th by using something like that:
VALUE1=1000
VALUE2=2000
VALUE3=3000
for((i=1;i<=3;i++));
do
sed "s/STRING_ZERO/$VALUE'$i'/" FILE_ZERO.txt >> FILE_NEW.txt;
done
but it doesn't work...
Any help... (9 Replies)
Discussion started by: Giordano Bruno
9 Replies
9. Shell Programming and Scripting
hii,
i need a unix command which replaces all occurrences of a substring within a string with another substring.
My solution:
string="plalstalplal"
sub1="al"
sub2="mlkl"
echo sed 's/$s2/$s3/g' < s1 > p
i want to know how to read the variables s2 and s3..
thaks a lot
bye (1 Reply)
Discussion started by: priya_9patil
1 Replies
10. Shell Programming and Scripting
Hi folks,
there are windows device names in the sixth column of a comma separated file. A example device name is:
\\.\Tape0
I don't get the all string in to a variable, because of the preceding backslash. The first backslash is just cut off and my attempts to manipulate the string afterward... (0 Replies)
Discussion started by: wibo1
0 Replies