10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
:D:D:D
These are list of command i typed on opensuse terminal and evolve lots of doubt around ,that i can't answer.
COMMAND 1 linux-xavv:/ # cd
COMMAND 2 linux-xavv:~ #
Does above command 1 and command two with red labelled sign make different meaning or same .
1
linux-xavv:/... (1 Reply)
Discussion started by: lobsang
1 Replies
2. Homework & Coursework Questions
hi gurus,
I am not sure what the below commands does.
awk 'BEGIN {sum=0} {sum=sum+$5} END {print sum}' input_file (4 Replies)
Discussion started by: ramkumar15
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Sorry if this is a newbie question. I guess you can use either awk or shell script for this sequence of operations, but knowing very little about either of them I'm not sure how I should try to write this.
The basic objective is to copy certain files that are scattered all over my... (10 Replies)
Discussion started by: pc2001
10 Replies
4. Shell Programming and Scripting
Hi,
I am studying an awk command:
awk '{ sub(/\/\/.*/, "", $NF); print }' input.txt
The input.txt is:
char*s1="//hello"; //comment
//delete
/* hello //*/
The output is :
char*s1="//hello";
/* hello (2 Replies)
Discussion started by: jeffwang66
2 Replies
5. IP Networking
edit: SOLVED - see below for solution
Hi there,
I've inherited a gob of Linux hosts and so am learning linux from the bottom of the deep end of the pool (gotta say I'm warming up to Linux though - it's not half bad)
Right now iptables is confusing me and I could use some pointers as to how... (0 Replies)
Discussion started by: Smiling Dragon
0 Replies
6. Shell Programming and Scripting
Hi,
I am using below awk code to convert a csv file data into fixed file format.
awk 'BEGIN { FS = ","
fmt = "%10s%010d%10s%d%1d\n" }
NR>1 { printf fmt, $1, $2, $3, $4*100, $5 }' /data/mydata.csv > /data/fixed.dat
Data in mydata.csv
================... (2 Replies)
Discussion started by: kbmkris
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am using below awk code to convert a csv file data into fixed file format.
awk 'BEGIN { FS = ","
fmt = "%10s%010d%10s%d%1d\n" }
NR>1 { printf fmt, $1, $2, $3, $4*100, $5 }' /data/mydata.csv > /data/fixed.dat
Data in mydata.csv
================... (1 Reply)
Discussion started by: kbmkris
1 Replies
8. Shell Programming and Scripting
Hello,
I have a log file , i want to delete the lines of the log file which is match with 1st and 5th field with different patterns. Once it will meet with that condition it will delete that line from the log . I dont want to create any temp file over there.
Successfully able to retrieve the... (1 Reply)
Discussion started by: posix
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a months worth of data that I need to separate into weekly files. There is a date column with dates in the following format: YYYYMMDD.
I'm thinking I can create the weekly files by using a grep command combined with an IF command and specify each day of the specific week I'm... (1 Reply)
Discussion started by: cwl
1 Replies
10. UNIX for Dummies Questions & Answers
Hello!
I have written this script:
for file in "$( find $dirName -type d )"
do
echo "$file"
echo "hello"
done
but as a result I get all the directories and in the end the work "hello". Shouldn't it print the word "hello" after printing the name of each directory and not in the end?
... (1 Reply)
Discussion started by: GeorgeP
1 Replies