8 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
So I created two shell variables: COLUMN1_HEADING, COLUMN2_HEADING.
They have values:
COLUMN1_HEADING="John"
COLUMN2_HEADING="123456789"
How would I use printf to get it to print an output like this: $COLUMN1_HEADING\t$COLUMN2_HEADING\nJohn\t123456789\n
Thanks! (3 Replies)
Discussion started by: steezuschrist96
3 Replies
2. Shell Programming and Scripting
Hello to all,
Maybe someone could help me, my question is:
How can a filter the print of command ls for the files with names of the form "abc*.txt" including the path?
I've done this:
If I move with command cd to /My/Path/Is/This/ and send this command:
ls -lst abc*.txt -i... (37 Replies)
Discussion started by: Ophiuchus
37 Replies
3. Shell Programming and Scripting
Does anyone know of a way to zip the resulting file from a find command?
My approach below finds the file and zips the entire directory path, which is not what I need.
After scanning the web, it seems to be much easier to perform gzip, but unfortunately the approach must use zip.
find `$DIR`... (5 Replies)
Discussion started by: koeji
5 Replies
4. Shell Programming and Scripting
I am using C Shell MKS Toolkit and I ran into a huge problem when setting up some environment variables.:confused:
The csh script that I have as my login script runs fine but very very slow.
When I add a directory to my PATH it seems to slow down shell startup and even slow down the commands. ... (0 Replies)
Discussion started by: vas28r13
0 Replies
5. Shell Programming and Scripting
How do I filter only comments and still keep Line breaks at the end of the line!?
This is one of the common tasks we all do,, How can we do this in a right way..!?
I try to ignore empty lines and commented lines using following approach.
test.sh
# \040 --> SPACE character octal... (17 Replies)
Discussion started by: kchinnam
17 Replies
6. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have a script that reads a file and echo it back to std out.
Test.txt
1aaaaaaaaaaa .
The script is ReadLine.sh
#!/bin/ksh
cat $1 | while read file
do
echo $file
done
I invoke the script as ReadLine.sh Test.txt
The output that I get is (1 Reply)
Discussion started by: aksarben
1 Replies
8. Shell Programming and Scripting
I set my path environment variable in c shell, using the
syntax below
setenv PATH "${PATH}:/usr/local:/usr/local/bin"
and placed this in $HOME/.login
$HOME/.cshrc
and /etc/.login
/etc/.cshrc
but when I issued echo $PATH or set command
the output does not reflect changes made to... (5 Replies)
Discussion started by: hassan2
5 Replies