10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have several line in a text file. for example
I like apple;
I like apple
I like orange;
Output: I like apple
I try to useif grep -q "!\;$"; then (Not work)
Please use CODE tags when displaying sample input, sample output, and code segments (as required by forum rules). (1 Reply)
Discussion started by: cmdcmd
1 Replies
2. Shell Programming and Scripting
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies
3. Shell Programming and Scripting
Hi,
Since today, with csh or tcsh, if I do 'ls files* > list',
every lines end with an extra space!
What happenned?
What can I do to go back when there was no extra space?
If I change to bash, there's no extra space.
Thanks,
Patrick
---------- Post updated at 03:19 PM... (1 Reply)
Discussion started by: trogne
1 Replies
4. Shell Programming and Scripting
Hi Folks,
I was given a task to append three IP's at the end of a specific (and unique) line within a file on multiple servers.
I was not able to do that with the help of a script. All I could was:
for i in server1 server2 server3 server4
do
ssh $i
done
I know 'sed' could be used to... (5 Replies)
Discussion started by: momin
5 Replies
5. Shell Programming and Scripting
Hi,
As i am new to this forum i dont really know where to place this doubt i am facing ,Please consider this
In this code i am connecting two time to two different server / database and getting the .sql file
where am i going wrong please guide..... me.
thanks a lot
if ; then
echo... (2 Replies)
Discussion started by: oracle_coorgi
2 Replies
6. Shell Programming and Scripting
Hello.
I have a file (old.txt) that I need to copy into another file (new.txt).
Each line on old.txt ends with CR/LF but the position of CR/LF varies from one record to another.
I need to copy each line of record to new.txt and move CR/LF in pos 165.
Can I use awk to achieve this? How?... (8 Replies)
Discussion started by: udelalv
8 Replies
7. Shell Programming and Scripting
Hi All,
I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected".
I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
Discussion started by: schandrakar1
7 Replies
8. Shell Programming and Scripting
Hi All ,
I am new to shell scripting.
i have a shell script(which is executed as a super user) , i want to it to do one more job for me. ie mounting a directory over other using lofs .
i have done it manually using
1) using mount command
mount -F lofs /export/home/dju /dju
2)... (4 Replies)
Discussion started by: meet123321
4 Replies
9. Shell Programming and Scripting
I have a file containing records seperated by delimiter '|'.A record is contained on 2 or 3 lines. Now I need a shell script which could write all records with in two '|' character in one line.....for example.....
|R1........................R1
R1..........................R1... (2 Replies)
Discussion started by: 33junaid
2 Replies
10. Shell Programming and Scripting
hi
I face the problem the if else statement dint return correct result for me
my script as below:
#!/bin/ksh
sqlplus -s /nolog <<EOF
connect databaseuser/password
column num new_value num format 9999
set head off
select count(*) num from table1;
exit num
EOF
if ; then
echo "$?"... (6 Replies)
Discussion started by: jaseloh
6 Replies