9 More Discussions You Might Find Interesting
1. 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
2. Solaris
Hello,
this is solaris 10 on SF v440,
I know below errors might go away if I put a new PS or put the original one back in socket but is there any other way to stop these errors from appearing in /var/adm/messages ? I do not want to put the failed PS1 in socket neither do we want to spend on... (5 Replies)
Discussion started by: upengan78
5 Replies
3. Shell Programming and Scripting
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies
4. Shell Programming and Scripting
Hi all,
I am having few files which needs to be concted into a single file and then it is compressed and FTPed from the UNIX server to the Windows server.
For the above purpose i am using gzip command to compress the files after concetenation.
And i am FTP ing the compressed file in the... (3 Replies)
Discussion started by: Codesearcher
3 Replies
5. Shell Programming and Scripting
Hi,
I have some problem with following command.
$path='pwd'.”/pack”;
When I check the value in the variable path , it give the following output
/tmp/new /pack
The pwd will be /tmp/new
Now the problem is the spaces is added between pwd and the appended path.
I need the output like... (5 Replies)
Discussion started by: kalpeer
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is.
I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies
7. UNIX for Advanced & Expert Users
Hi all,
I have a directory where some process is keeping incremental/new log files. I need to code a program which will periodically poll this directory and if it founds a new file arrived then copy that new file to some other specific directory.
We are OK with this polling approach. I just... (3 Replies)
Discussion started by: zing_foru
3 Replies
8. UNIX for Dummies Questions & Answers
I am reading a file and copying selected lines from the file into another using echo.
For eg:
while read line
do
if ((some logic to determine whether I need to copy the current line to another file))
then
echo $line > tempfile
fi
done<srcfile
The problem I have is the data in the file... (1 Reply)
Discussion started by: prathima
1 Replies
9. Shell Programming and Scripting
I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help.
echo $SH_VAR | command_line Syntax.
The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies