10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm writing a script which tries to parse human-readable addresses. Part of it is this:
print $2, implode(A,1,AN," "), CITY, PROV, POST, COUNTRY, CITYCOUNT>2;
CITYCOUNT is a variable between 0 and 3 counting the number of words in a city name. I'm trying to prnt 1 wherever that's greater... (5 Replies)
Discussion started by: Corona688
5 Replies
2. Shell Programming and Scripting
Hi,
I have a peculiar issue w.r.t redirecting the command output to a file when using loop.
I am redirecting command output to same file in a series of if condition statements, but if one block of if condition statement writes the log to the file , the subsequent block of if condition... (7 Replies)
Discussion started by: ananan
7 Replies
3. UNIX for Dummies Questions & Answers
I almost reach my objective (Youhouuu !!!!)
But I really don't understand why it doesn't work until the end... :wall:
For clarity's sake I am taking a very simple example. The operations I am doing in the script (gsub and print) really don't have any importance !!! I just matter about... (10 Replies)
Discussion started by: beca123456
10 Replies
4. Shell Programming and Scripting
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
5. Shell Programming and Scripting
So I have a existing file that I used the uniq command on and I need to save the output to the same file without changing the file name.
I have tried $ uniq filename > filename
then when I cat the file it then becomes blank like there is nothing inside.
any help would be much appreciated... (0 Replies)
Discussion started by: drew211
0 Replies
6. UNIX for Dummies Questions & Answers
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies
7. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
cat a>a
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
1 Replies
8. Shell Programming and Scripting
Hi,
I want ssh to the remote server and then execute ls and redirect the output to the file in remote server itself
like
ssh root@$server `ls /var/log/users.txt > root@$server:/home/users.txt`
Can you please let me know the correct syntax for it.
Thanks in advance (2 Replies)
Discussion started by: mohitmoudgil
2 Replies
9. UNIX for Dummies Questions & Answers
Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work
Step 1
touch log.txt
at -f batch.sh now >> log.txt
I am trying to get the batch.sh contents into the log file
Manny Thanks (8 Replies)
Discussion started by: JohnCrump
8 Replies
10. Shell Programming and Scripting
Hi,
i use awk -F to print three variable delimited by comma $1 $2 $3
if $2=="" i want to extract this information missing from another file using awk -v + some process.
but the problem i can't use the two awk together cause of redirection
there's a solution.
note: i can't use another... (1 Reply)
Discussion started by: kamel.seg
1 Replies