10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies
2. Shell Programming and Scripting
hello,
I have prepared a script
------------------------------------------------
#!/bin/sh
cat test.txt| sed '1d' | sed '$d' > /tmp/tmp1.txt
while read line
do
typeset -i count=`echo $line | tr ' ' '}' | wc -c`
finalcount=`expr $count - 1`
echo $finalcount
done <... (12 Replies)
Discussion started by: rac
12 Replies
3. Programming
Hi all ,
I need to know how to convert a time stamp entered by the user to be converted to GMT/UTC(epoch time) using mktime() and gmtime()
for exapample the input will be put in the form
ptm.tm_sec = 0;
ptm.tm_min = 59;
ptm.tm_hour = 11;
ptm.tm_mday = 20;... (2 Replies)
Discussion started by: ada
2 Replies
4. Shell Programming and Scripting
Hello Exprets,
I have a requirement where i have to subtitue a word with another word.
$eachline| sed 's/*$//'
a) $eachline will hold a value a path
for example
user/oracle/Test_admin/myfolder/bakup/part_bkptemp_part_bkp_repeated/list.txt
b)
$eachline| sed 's/*$//'
will give me the... (3 Replies)
Discussion started by: aks_1902
3 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm making my first program with perl and am supposed to allow the user to either use the current date or enter a... (0 Replies)
Discussion started by: Zamereon
0 Replies
6. Shell Programming and Scripting
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
7. UNIX for Dummies Questions & Answers
Hey All,
On commad promt of a shell..
How can we move our cursor word by word.
Like Ctrl+A takes to the starting of the command...
Any shortcut like that..?
Thanks
pbsrinivas (1 Reply)
Discussion started by: pbsrinivas
1 Replies
8. Programming
Hi ,
I m writing a program which involves piping(pipes).
In my program, once i execute the child process (dealing with pipe),I m not able to see any inputted command on the screen....but the entered command is getting executed...
Actaully inorder to implement piping i hav closed STDIN and... (3 Replies)
Discussion started by: Crab
3 Replies
9. Shell Programming and Scripting
I need to create a shell script that takes 2 arguments, the first argument is any number, and the second argument is a filename. The script needs to indicate if the file's size is bigger or smaller than the number provided.
I know it will be some kind of if/then, but I can't figure out how to... (1 Reply)
Discussion started by: Modoc
1 Replies
10. Shell Programming and Scripting
Hi everybody,
Do you know how to hide the text for interactive unix shell script? Just like the case for inputting password during logon.
Patrick (1 Reply)
Discussion started by: patrickpang
1 Replies