9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In the else of the main if condition .
set lnk = $(readlink -f <path> | cut -d '/' -f7)
When I run the above on command line , the execution seems to be fine and I get the desired output. But when I try to assign it to a variable within a loop... (12 Replies)
Discussion started by: sankasu
2. Shell Programming and Scripting
I'm very much a newbie and hence why this is going to be a stupid question.
I'm attempting to create a korn shell script that pulls zone file locations and includes the copy command in the output. What?
while read -r domain
do ls */*"$domain" > $dir1
echo "cp... (5 Replies)
Discussion started by: djzah
3. Shell Programming and Scripting
This is my input file
Now, I would like to run a program that will take each of the input record
for i in `cat input`; do program $i | wc -l;done
the output will be something like
But, I would like to print the... (4 Replies)
Discussion started by: jacobs.smith
4. Shell Programming and Scripting
I would like to redirect output of command line in for loop as $line.
Output should be processed as line but instead it throw whole output.
Could somebody help me on how to redirect output of command line and process it line by line without sending output to any file.
below is my code ... (1 Reply)
Discussion started by: tapia
5. Shell Programming and Scripting
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
$ ./prog 1... (1 Reply)
Discussion started by: alice06
Hi, with this command:
cu -l /dev/ttyACM0 -s 9600 > name.txt
I put the output of the port in a txt
Is posible to do the same (or similar) in a var directly, inside a C program?
cu -l /dev/ttyACM0 -s 9600 > variable ?
I have trying this withs pipes, but i dont know how to... (6 Replies)
Discussion started by: daaran
7. Shell Programming and Scripting
If I run this command
I get the following output.
I want to make changes to only anything that contains the word "Ethernet" which I can do with grep.
But What I really need a... (6 Replies)
Discussion started by: elbombillo
8. Shell Programming and Scripting
i have two questions, I am new to programming
1. I have an output of a command and i want to get some specific part of it in a variable. i am trying
sr=`some comand xyz| grep 'Last Changed Rev:' | cut -c19-`
now variable sr gets a end of line character at end.
output of the command... (3 Replies)
Discussion started by: muaz
9. Shell Programming and Scripting
With cut -c 8-13 myfile,
I am getting some numeric value.
In my shell script I am trying to assign something like this,
var=cut -c 8-13 myfile
But at the time of execution I am getting -c is not found.
If I dont assign, then script executes well.
Can we not simply use the value from one... (8 Replies)
Discussion started by: videsh77