10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI
I am trying to grep 3 characters from hostname and append a character at the end.
I tried as in the following:
root@abag3:~# hostname | cut -c1-3
hyu
Now I am trying to append "g" at the end of this output as in the following.
root@abag3:~# hostname | cut -c1-3 | sed -s... (4 Replies)
Discussion started by: Priya Amaresh
4 Replies
2. Shell Programming and Scripting
Hi
I've been trying to search but couldn't quite get the answer I was looking for.
I have a a file that's like this
Time, 9/1/12
0:00, 1033
0:10, 1044
...
23:50, 1050
How do I make it so the file will be like this?
9/1/12, 0:00, 1033
9/1/12, 0:10, 1044
...
9/1/12, 23:50, 1050
I... (4 Replies)
Discussion started by: diesel88
4 Replies
3. UNIX for Advanced & Expert Users
Please find the input file as given below:
2012/02/29 11:00:00~~CRITICAL~For customer 00000476 no daily files were found in the 010137933 account directory.
2012/02/29 11:00:00~~CRITICAL~For customer 05006802 no daily files were found in the 010115166 account directory.
2012/02/29... (0 Replies)
Discussion started by: av_sagar
0 Replies
4. 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
5. Shell Programming and Scripting
I am running a shell script which executes a bteq script and the output of the BTEQ script is dumped in the standard output file. The output of the bteq execution is a table with 30 columns and the width of the output would be about 800 characters for each record.
My current output only shows 3... (3 Replies)
Discussion started by: Mihirjani
3 Replies
6. Shell Programming and Scripting
I have an xml file.
I am doing some change, say deleting line 770. File name is file.xml. I use:
sed '770d' file.xml
but this does not actually make changes in the *file* but shows the changes on standard output (screen)
if i use
$var=`sed '770d' file.xml`
echo $var > file.xml
this... (3 Replies)
Discussion started by: indianjassi
3 Replies
7. Shell Programming and Scripting
Hi,
I am try to setup a FOR loop script to find out all the existing linux workstations in the network w/ ip address, hostname and linux version.
I created a basic FOR loop script:
for i in $(seq 1 254)
do
echo 10.72.169.$i >> result
ssh -o ConnectTimeout=3 root@10.72.169.$i "hostname"... (1 Reply)
Discussion started by: beeloo
1 Replies
8. UNIX for Dummies Questions & Answers
dear
i have one file regarding
>abshabja>sdksjbs>sknakna>snajxcls
so i want to be output like
>abshabja
>sjkabjb
>sknakna
>snajxcls
Any using awk or sed will help
thanks (2 Replies)
Discussion started by: cdfd123
2 Replies
9. Shell Programming and Scripting
hi,
i have a file
file1 file2
----------- -----------------
aa bbb ccc 111 1111 1111
ddd eee fff 222 3333 4444
ggg hhh... (5 Replies)
Discussion started by: go4desperado
5 Replies
10. UNIX for Dummies Questions & Answers
:confused:
I have a script that Cats a flat database file which contains 12 columns into sed. I want to add a 13th column which includes " ,2005-08-29 " * The date needs to be the current date.
This 13th column would be appended to the end of each line.
Does anyone have a clue... (5 Replies)
Discussion started by: Redg
5 Replies