10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am still learning shell scripting. Recently I see a function for read configuration. But some of special character make me confused. I checked online to find answer. It was not successful. I post the code here to consult with expert or guru to get better understanding on these special characters... (3 Replies)
Discussion started by: duke0001
3 Replies
2. Shell Programming and Scripting
Hi All,
Below is a sample command that I can run without any problem in the command line.
Command Line
dtToday=`date +%Y%m%d`; ls -ltr ./filename_${dtToday}.txt
-rw-r--r-- 1 monuser oinstall 0 Jan 18 11:02 ./filename_20130118.txt
But once I put that command line in file (list.txt) and... (3 Replies)
Discussion started by: padi
3 Replies
3. Shell Programming and Scripting
consider the small piece of code
while read line
do
echo $line
done < example
content of example file
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the output is like
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the... (4 Replies)
Discussion started by: Kesavan
4 Replies
4. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
5. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
6. Shell Programming and Scripting
I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish.
And this is... (2 Replies)
Discussion started by: Shingoshi
2 Replies
7. UNIX for Dummies Questions & Answers
Here is a sample code
grep '903' -i user.txt | tail -2 | awk '{print $2}' | sed 's/B//g'
the input file has data as such
903-xxx-xxxxB
903-xxx-xxxxB
It is a dialer file i want to remove the "B"
any help thanks (5 Replies)
Discussion started by: Iz3k34l
5 Replies
8. Shell Programming and Scripting
I'm a Linux newb, I've been running a Debian Linux server for about a year now, and I've written some simple scripts to automate various things, but I still don't know much, and I forget what I learn as fast as I figure it out... Anyway, that really isn't important, I just want you to know that... (14 Replies)
Discussion started by: Drek
14 Replies
9. Shell Programming and Scripting
hello,
i need an algorithm which reads a line specified to it in shortest possible time.
i am already using sed, i need a better way. please suggest me alternatives (2 Replies)
Discussion started by: rochitsharma
2 Replies
10. Programming
Can anyone help me?????
My problem is that i want to read only one charcter from keyboard. Each time my program waits to press enter or ^d. I don't want that. As soon as i press a charcter it should proceed to next statement in program without pressing enter or ^d.
please help... (3 Replies)
Discussion started by: alodha
3 Replies